# Prelude.
AC_INIT([gearserial], [1.0], [diogo.ramos@usp.br])

# unique source file --- primitive safety check 
AC_CONFIG_SRCDIR([src/gs_main.c])

# place to put some extra build scripts installed
AC_CONFIG_AUX_DIR([build-aux])

# fairly severe build strictness
# change foreign to gnu or gnits to comply with gnu standards
AM_INIT_AUTOMAKE([-Wall -Werror foreign])

# Checks for programs.
AC_PROG_CC

# Checks for libraries.
PKG_CHECK_MODULES([GTK], [gtk+-2.0 >= 2.12])
AC_SUBST([GTK_LIBS])
AC_SUBST([GTK_CFLAGS])

PKG_CHECK_MODULES([GLADE], [libglade-2.0 >= 2.6])
AC_SUBST([GLADE_LIBS])
AC_SUBST([GLADE_CFLAGS])

# Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([stdlib.h])

# Checks for typedefs, structures, and compiler characteristics.

# Checks for library functions.
AC_FUNC_MALLOC

# Output files
AC_CONFIG_HEADERS([config.h])

AC_CONFIG_FILES([Makefile
                 src/Makefile
		 data/Makefile])
AC_OUTPUT
